package org.akomantoso.core.io.util.group;

import java.util.IdentityHashMap;
import java.util.Map;

import org.akomantoso.core.data.BlockList;
import org.akomantoso.core.data.Toc;
import org.akomantoso.core.data.group.ANblock;
import org.akomantoso.core.io.util.Instantiator;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public final class ANblockGroup {

	private ANblockGroup() {
	}

	public static final Map<String, Instantiator<ANblock>> MAP;

	static {

		Map<String, Instantiator<ANblock>> temp = new IdentityHashMap<String, Instantiator<ANblock>>();

		// toc
		temp.put(Toc.ELEMENT.intern(), new Instantiator<ANblock>() {
			public Toc instantiate() {
				return new Toc();
			}
		});

		// blockList
		temp.put(BlockList.ELEMENT.intern(), new Instantiator<ANblock>() {
			public BlockList instantiate() {
				return new BlockList();
			}
		});

		MAP = temp;
	}
	
}